package com.doone.telmarket.domain.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.doone.telmarket.domain.ibator.ServiceClassify;
import com.doone.telmarket.domain.ibator.ServiceClassifyExample;
import com.doone.telmarket.domain.service.ServiceClassifyOperation;
import com.doone.telmarket.infrastructure.dao.ServiceClassifyDAO;

/**
 * @package com.doone.telmarket.domain.service
 * @author 甘雨波
 * @date 2009-09-15 15:42
 * @description 增值业务功能类别业务层接口实现类
 *
 */
@Service("serviceClassifyOperation")
public class ServiceClassifyOperationImpl implements ServiceClassifyOperation {

	@Autowired
	private ServiceClassifyDAO serviceClassifyDAO;
	
	/**
	 * @description 删除增值业务功能类别
	 * @author 甘雨波
	 * @date 2009-9-15 15:40
	 * @return
	 */
	public int deleteServiceClassify(int id) {
		return serviceClassifyDAO.deleteByPrimaryKey(id);
	}

	/**
	 * @description 保存增值业务功能类别
	 * @author 甘雨波
	 * @date 2009-9-14 15:35
	 * @return
	 */
	public int saveServiceClassify(ServiceClassify record) {
		return serviceClassifyDAO.insert(record);
	}

	/**
	 * @description 获取所有增值业务功能类别列表
	 * @author 甘雨波
	 * @date 2009-9-15 15:38
	 * @return
	 */
	public List<ServiceClassify> selectAllServiceClassify() {
		return serviceClassifyDAO.selectByExample(new ServiceClassifyExample());
	}

	/**
	 * @description 编辑增值业务功能类别
	 * @author 甘雨波
	 * @date 2009-9-14 15:42
	 * @return
	 */
	public int updateServiceClassify(ServiceClassify serviceClassify) {
		return serviceClassifyDAO.updateByPrimaryKey(serviceClassify);
	}

}
